﻿using System.Web.Mvc;
using Actya.Core.Infrastructure;

namespace Actya.Web.Controllers.CmsAdmin
{
	public class ToolbarController : Controller
	{
		private readonly ICmsContext _cmsContext;

		public ToolbarController(ICmsContext cmsContext)
		{
			_cmsContext = cmsContext;
		}

		public ActionResult Index()
		{
			if (_cmsContext.Page != null)
			{
				ViewBag.PageId = _cmsContext.Page.Id;
			}
			ViewBag.IsPreview = RouteData.Values.ContainsKey("tempurl");
			return PartialView();
		}
	}
}